package lwx.thread;

public class MyRunnable implements Runnable{

    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println(i);
        }
    }

    public static void main(String[] args) {
        /*MyRunnable myRunnable = new MyRunnable();
        Thread thread = new Thread(myRunnable);
        thread.start();*/

        new Thread(() ->
                System.out.println("线程执行:"+ Thread.currentThread().getName())).start();
    }
}
